package pl.edu.pb.wi.pwnography.session;

import java.util.logging.Logger;

import org.springframework.context.annotation.Scope;
import org.springframework.context.annotation.ScopedProxyMode;
import org.springframework.stereotype.Component;

import pl.edu.pb.wi.pwnography.model.form.ChartScatterForm;

@Component
@Scope(value = "session", proxyMode = ScopedProxyMode.TARGET_CLASS)
public class ChartScatter {
    private static final Logger log = Logger.getLogger(ChartScatter.class
	    .getName());

    private ChartScatterForm scatterForm;

    public ChartScatter() {
	scatterForm = new ChartScatterForm();
    }

    public ChartScatterForm getScatterForm() {
	return scatterForm;
    }

    public void setScatterForm(ChartScatterForm scatterForm) {
	log.info(String.format(
		"Writing new form to session: X [%s] Y [%s] Class [%s]",
		scatterForm.getxColumn(), scatterForm.getyColumn(),
		scatterForm.getClassColumn()));

	this.scatterForm = scatterForm;
    }

}
